import cTitle from 'components/title';
import { scrollMixin } from 'utils/mixin';
export default {
  mixins: [scrollMixin], // 加载更多
  data() {
    return {
      radio: '1',
      list:[]
    };
  },
  methods: {
    goToAdd() {
      this.$router.replace(this.fun.getUrl('bankcardinadd',{}));
    },
    goToEdit(id) {
      this.$router.replace(this.fun.getUrl('bankcardinedit', {id:id}));
    },
    getData() {
      $http.get('plugin.converge_pay.frontend.controllers.converge-pay-bank-card.get-bank-card-list',).then( (res) =>{
        if (res.result === 1) {
          this.list = res.data;
        } else {
          this.$dialog.alert({message:res.msg});
        }
      }, function (response) {
        // error callback
      });
    }

  },
  activated() {
    this.getData();
  },
  components: {cTitle}
};
